package cz.muni.fi.pa165.dundd.service;

import cz.muni.fi.pa165.dundd.dto.TroopDTO;
import java.util.List;

/**
 *
 * @author Šimon Demočko
 */
public interface TroopService {

    /**
     * Sends a request to the DAO to persist a troop corresponding to the dto given as parameter.
     * @param troop DTO instance from which to recreate Troop object to be persisted.
     */
    public void createTroop(TroopDTO troop);

    /**
     * Sends update request to the persistence layer.
     * @param troop to be updated.
     */
    public void updateTroop(TroopDTO troop);

    /**
     * Sends delete request to the persistence layer.
     * @param troop to be deleted.
     */
    public void deleteTroop(TroopDTO troop);

    /**
     * Sends retrieval request of all Troops from the persistence layer.
     * @return list of Troop DTOs to be retrieved.
     */
    public List<TroopDTO> retrieveAllTroops();

    /**
     * Sends retrieval request of a troop by its id from the persistence layer.
     * @param id of troop to be retrieved.
     * @return troopDTO to be retrieved.
     */
    public TroopDTO retrieveTroopById(Long id);
}
